#pragma once

#include "../umlmodel_global.h"

#include "UMLLabel.h"

namespace uml {
class Property;

/// <summary>
/// UMLAssociationEndLabel
/// Shows text about Properties that are Association ends.
/// </summary>
class UMLMODEL_EXPORT UMLAssociationEndLabel : public UMLLabel {

public: // Constructors and destructors
    explicit UMLAssociationEndLabel(const QString& umlType="uml::UMLAssociationEndLabel");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// modelElement getter
    /// Restricts UMLAssociationEndLabels to show only Properties (that are
    /// AssociationEnds, see constraint).
    /// </summary>
    shared_ptr<Property> modelElement() const;

    /// <summary>
    /// modelElement setter
    /// Restricts UMLAssociationEndLabels to show only Properties (that are
    /// AssociationEnds, see constraint).
    /// </summary>
    void setModelElement(shared_ptr<Property> value);

private: // Fields
    /// <summary>
    /// modelElement
    /// Restricts UMLAssociationEndLabels to show only Properties (that are
    /// AssociationEnds, see constraint).
    /// </summary>
    shared_ptr<Property> modelElement_;

};

} // namespace uml
